package com.pay.game.central.utils.bean;

import java.util.ArrayList;
import java.util.List;

public class MyHeader {

    private String userId;

    private List<String> roles = new ArrayList<>();


    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public List<String> getRoles() {
        return roles;
    }

    public void setRoles(List<String> roles) {
        this.roles = roles;
    }

    public boolean isAdmin() {
        return roles.contains("admin");
    }

    public String getRootId(){
        return  isAdmin() ? "" : userId;
    }
}
